package com.whp.yky.yky.controller;


import com.whp.yky.yky.entity.ShopType;
import com.whp.yky.yky.service.impl.ShopGoodsServiceImpl;
import com.whp.yky.yky.service.impl.ShopTypeServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "商品类别接口")
@CrossOrigin
@RestController
public class ShopTypeController {

    @Autowired
    private ShopTypeServiceImpl shopTypeService;



    @ApiOperation(value="获取所有类别", notes="获取所有类别")
    @GetMapping(value = "/findAllType")
    public List<ShopType> findAllType(){
        return shopTypeService.list();
    }

}
